/*
* Copyright (C) 2012  lidp.
*
* Contact: lidp <openser@yeah.org>
*	
* This file is part of Open Source Peasant Framework.
*
* Peasant is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*	
* You should have received a copy of the GNU General Public License
* along with Peasant.
*
*/

/**@file pst_mem.h
 * @brief memeory manager  utilities with logger
 *
 */

#ifndef __PST_MEM_H__
#define __PST_MEM_H__

#include "pst_config.h"
#include <stdlib.h>

PST_BEGIN_EXTERN_C

#define PST_SAFE_FREE(ptr)  (void)pst_free((void**)(&ptr))

PST_API  void* pst_malloc(pst_size_t size);
PST_API  void*pst_calloc(pst_size_t num, pst_size_t size);
PST_API  void pst_realloc(void *ptr, pst_size_t len);
PST_API  void pst_free(void **ptr);


PST_END_EXTERN_C

#endif
 